import request from '@/utils/request'
import qs from 'qs'

const ha_role_userApi = {
    list: '/ha_role_user/list',
    save: '/ha_role_user/save',
    view: '/ha_role_user/view',
    del: '/ha_role_user/delete',
    dels: '/ha_role_user/batchDel',
    output: '/ha_role_user/output',
    batchSave: '/ha_role_user/batchSave'
}

/**
 * 保存
 */
export function batchSave (params,data) {
    console.log(params,'----',data)
    return request({
        url: ha_role_userApi.batchSave,
        method: 'post',
        data: data ,
        params: params
    })
}
/**
 * 导出
 */
export function output (data) {
    return request({
        url: ha_role_userApi.output,
        method: 'post',
        data: data ,
        responseType: 'blob'
    })
}
/**
 * 批量删除
 * @param {*} parameter
 */
export function delHa_role_users (ids) {
    return request({
        url: ha_role_userApi.dels,
        method: 'post',
        params: ids
    })
}
/**
 * 删除
 * @param {*} id
 */
export function delHa_role_user (id) {
    return request({
        url: ha_role_userApi.del + '/' + id,
        method: 'post'
    })
}
/**
 * 查看、编辑
 * @param {*} id
 */
export function viewHa_role_user (id) {
    return request({
        url: ha_role_userApi.view + '/' + id,
        method: 'post'
    })
}
/**
 * 保存
 * @param {*} parameter
 */
export function saveHa_role_user (parameter) {
    return request({
        url: ha_role_userApi.save,
        method: 'post',
        data: parameter
    })
}
/**
 * 查询列表
 * @param {*} parameter
 */
export function queryHa_role_userList (parameter) {
    return request({
        url: ha_role_userApi.list,
        method: 'post',
        data: parameter
    })
}